<?php


namespace app\admin\validate;


use think\Validate;

class CountryConfig extends Validate
{
    //字段规则
    protected $rule = [
        'name' => 'require',
        'lang' => 'require',
        'currency_name' => 'require',
        'currency_identify' => 'require',
    ];

    //验证器提示信息
    protected $message = [
        'name.require' => 'name不能为空',
        'lang.require' => 'lang不能为空',
        'currency_name.require' => 'currency_name不能为空',
        'currency_identify.require' => 'currency_identify不能为空',
    ];

    //使用场景
    protected $scene = [
        'add' => ['name', 'lang', 'currency_name', 'currency_identify'],
        'edit' => ['name', 'lang', 'currency_name', 'currency_identify']
    ];
}